﻿using System;
using System.Collections.Generic;
using HK.Core.Common.Data;
using HK.Core.Common.Protocol;
using HK.Core.Common.Protocol.Data;
using HK.Core.Serializable.Protocol.Data;

namespace HK.Core.Serializable.Data
{
    /// <summary>
    /// 序列化资产数据
    /// </summary>
    [Serializable]
    public abstract class SAssetData : JsonData<SAssetData>, ISAssetData
    {
        
#region Token
        
        /// <summary>
        /// 有效负载Tag
        /// </summary>
        public virtual string PayloadTag => GetType().Name;

#endregion

    }

    /// <summary>
    /// 序列化资产数据 - 列表
    /// </summary>
    /// <typeparam name="TList">列表类型</typeparam>
    /// <typeparam name="TElement">列表Element类型</typeparam>
    public abstract class SAssetListData<TList, TElement> : ListJsonData<TList, TElement>, ISAssetListData<TElement>
        where TList : JsonData, IListJsonData<TElement>
        where TElement : JsonData, IListElement, IEquatable<TElement>
    {
        
#region Token

        /// <summary>
        /// 有效负载Tag
        /// </summary>
        public virtual string PayloadTag => GetType().Name;

#endregion

    }
}
